<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="https://colorjs.io/dist/color.global.js"></script>
    <script>
        let color = new Color('#2492fc'),
            lightColor = new Color('white'),
            darkColor = new Color('black')
        console.log('color', color.mix(darkColor, color,30))

    </script>
</body>

</html>